﻿using System.Diagnostics.CodeAnalysis;
using System.Windows;
using System.Windows.Shapes;

namespace Bookvar.UI
{
    public abstract class ConnectingShape : Shape
    {
        public static readonly DependencyProperty StartPointProperty =
            DependencyProperty.Register( "StartPoint", typeof ( Point ), typeof ( ConnectingShape ),
                                         new FrameworkPropertyMetadata( new Point( 0, 0 ),
                                                                        FrameworkPropertyMetadataOptions.AffectsRender ) );

        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "EndPoint")]
        public static readonly DependencyProperty EndPointProperty =
            DependencyProperty.Register( "EndPoint", typeof ( Point ), typeof ( ConnectingShape ),
                                         new FrameworkPropertyMetadata( new Point( 0, 0 ),
                                                                        FrameworkPropertyMetadataOptions.AffectsRender));

        public Point StartPoint
        {
            get { return (Point) GetValue( StartPointProperty ); }
            set { SetValue( StartPointProperty, value ); }
        }

        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "EndPoint")]
        public Point EndPoint
        {
            get { return (Point) GetValue( EndPointProperty ); }
            set { SetValue( EndPointProperty, value ); }
        }
    }
}